<template>
  <div>
    <div class="kongbai"></div>
    <school-title Cname="学员感言"></school-title>

    <div class="studentText">
      <div v-for="item in studentsCon" :key="item.id">
        <img :src="'https://ss.lanqb.com/' + item.avatar" alt="" />
        <p>
          <b>{{ item.name }}:</b>{{ item.content }}
        </p>
      </div>
    </div>
  </div>
</template>

<script>
import SchoolTitle from "@/components/schoolTitle.vue";
export default {
  name: "SchoolStudentText",

  data() {
    return {
      studentsCon: [],
    };
  },
  components: {
    SchoolTitle,
  },
  mounted() {},
  methods: {},
  created() {
    fetch("https://m.lanqb.com/api/school/testimoniales?limit=3")
      .then((res) => res.json())
      .then((data) => {
        this.studentsCon = data.data;
        console.log(this.studentsCon);
      });
  },
};
</script>

<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
  .kongbai {
    width: 100%;
    height: 15px;
    background-color: #eee;
  }
  .studentText {
    padding: 0 10px;
    div {
      display: flex;
      padding: 10px 0;
      img {
        width: 78px;
        height: 78px;
        border-radius: 5px;
        margin-right: 10px;
      }
      p {
        width: 304px;
        height: 75px;
        display: -webkit-box;
        -webkit-box-orient: 4;
        overflow: hidden;
        color: #222;
        font-size: 12px;
        line-height: 1.5;
        text-align: justify;
        b {
          font-size: 15px;
        }
      }
    }
  }
}
</style>
